﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StarryEdge.Core.Device
{
    public interface IProtocol
    {
        /// <summary>
        /// 校验
        /// </summary>
        /// <param name="bytes"></param>
        /// <returns></returns>
        public bool Verify(IList<byte> bytes);
        /// <summary>
        /// 序列化
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        public byte[] Serialize(IList<byte> data);
        /// <summary>
        /// 反序列化
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        public byte[] Deserialize(IList<byte> data);
    }
}
